
<fieldset class="cbi-section">
	<legend><%:Running Status%></legend>
	<table width="100%" cellspacing="10" id="_udp2raw_status_table">
		<tr>
			<td width="33%"><%:Binary Version%></td>
			<td>
				<% if udp2raw_version == "" then -%>
				<em><%:Invalid Binary File.%></em>
				<% else -%>
				<%=pcdata(udp2raw_version)%>
				<%- end %>
			</td>
		</tr>
		<% if udp2raw_build ~= "" then -%>
		<tr><td width="33%"><%:Build Time%></td><td><%=pcdata(udp2raw_build)%></td></tr>
		<% end -%>
		<tr><td width="33%"><%:Running Status%></td><td id="_udp2raw_status"><em><%:Collecting data...%></em></td></tr>
	</table>
</fieldset>

<script type="text/javascript">//<![CDATA[
	var udp2raw_status = document.getElementById('_udp2raw_status');
	XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "udp2raw", "status")%>', null, function(x, status) {
		if ( x && x.status == 200 ) {
			udp2raw_status.innerHTML = status.running ? '<%:RUNNING%>' : '<%:NOT RUNNING%>';
		}
	});
//]]></script>
